package com.monitor.vo.enumeration;

/**
 * @ClassName EnumQueryType
 * @Package com.monitor.pojo.enumration
 * @Description TODO
 * @Author zhixingbai
 * @Create 2018/10/1416:58
 */
public enum EnumMonitorType {

    NOW("010","当日"),
    HISTORY("020","历史");

    private String code;

    private String msg;

    EnumMonitorType(String code, String msg){
        this.code=code;
        this.msg=msg;
    }

    public static String getMsgByCode(String code){
        for(EnumMonitorType type:values() ){
            if(type.code.equals(code)){
                return type.msg;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }
}
